import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: ()=>import('@/layout/admin-layout/admin-layout.vue'),
    redirect: '/index',
    meta: {
      module: 1000
    },
    children: [
      {
        path: 'index',
        name: 'index',
        component: () => import('@/views/index/index.vue'),
      },
     
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
   // 回到顶部配置
   scrollBehavior(to, from, savedPosition) {
    return { x: 0, y: 0 }
  }
})

export default router
